package com.example.common.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author littlehu
 * @data 2018/6/26 14:28
 * @Email 807115007@qq.com
 **/
public class TextUtils {

    //判断的方法
    public static boolean isMobileNO(String mobiles) {
        boolean flag = false;
        try {

            // 17********* ,13********* ,15********,18*********
            Pattern p = Pattern.compile("^((17[0-9])|(13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$");

            Matcher m = p.matcher(mobiles);
            flag = m.matches();

        } catch (Exception e) {
            flag = false;
        }

        return flag;
    }

}
